package com.huawei.fastengine.fastview.download.utils;

public abstract class StringUtils {
    private static final String TAG = "StringUtils";

    public static boolean isEmpty(String str) {
        return str == null || str.length() == 0;
    }

    public static String toDBC(String str) {
        char[] toCharArray = str.toCharArray();
        int i = 0;
        while (i < toCharArray.length) {
            if (toCharArray[i] == '　') {
                toCharArray[i] = ' ';
            } else if (toCharArray[i] > '＀' && toCharArray[i] < '｟') {
                toCharArray[i] = (char) (toCharArray[i] - 65248);
            }
            i++;
        }
        return new String(toCharArray);
    }
}
